﻿using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using YXChatApiService.Core.Common;
using YXChatApiService.ServiceCollectionExtension;

namespace YXChatApiService.Core.BuddyEntity.DomainManager
{
    public interface IBuddyManager:IDomainBaseManager<Buddy,Guid>
    {
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        Task<Buddy> InsertAsync(Buddy entity);
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task DeleteAsync(Guid id);
        /// <summary>
        /// 查询好友
        /// </summary>
        /// <param name="accountNumber"></param>
        /// <returns></returns>
        Task<List<Buddy>> GetBuddyAll(string accountNumber);
        /// <summary>
        /// 查询好友
        /// </summary>
        /// <param name="adderNumber">添加者账号</param>
        /// <param name="addeeNumber">被添加者账号</param>
        /// <returns></returns>
        Task<Buddy> GetBuddy(string adderNumber,string addeeNumber);
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        Task<bool> UpdateBuddy(Buddy entity);
        /// <summary>
        /// 查询
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<Buddy> Get(Guid id);
        /// <summary>
        /// 关系是否存在
        /// </summary>
        /// <param name="adderNumber"></param>
        /// <param name="addeeNumber"></param>
        /// <returns></returns>
        Task<Buddy> IsExistBuddy(string adderNumber, string addeeNumber);
    }
}